<!DOCTYPE html>
<html>
<head>
    <title> {$site_info.site_name|default=''}</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <hook name="before_head_end"/>
</head>
<body class="page-index">
<div class="container">
    <include file="public@nav"/>

    <div class="contents">
        <!--活动通知/公告-->
        <div class="activity">
            <div class="activityDetail newDetail">
                <div class="title">
                    <div class="newDetailTitle">
                        <div class="title-item">{$article.post_title}</div>
                        <div class="timeDw">
                            <img src="/html/img/timeNew.png" class="newImg">
                            <div class="newLeft">{:date('Y-m-d H:i',$article.published_time)}</div>
                            <img src="/html/img/zuz.png" class="newImg">
                            <div class="newLeft">{$article.user.user_nickname}</div>
                            <img src="/html/img/ck.png" class="newImg">
                            <div class="newLeft">{$article.post_hits}</div>
                            <div style="clear: both;"></div>
                        </div>
                    </div>
                </div>
                <div class="box-cont">
                    <div class="newContent">
                        {$article.post_content}
                    </div>
                </div>
            </div>
        </div>
        <div class="statistical">
            <widget name="last_articles">
            <div class="login box">
                <div class="title"><h2>最新公告</h2> <a href="{:url('/news')}" class="more newMore">MORE</a></div>
                <div class="box-cont hdtj zxgg">
                    <ul>
                        <portal:articles limit="5" order="post.published_time DESC"
                                         categoryIds="1,2,3,4">
                            <li>

                                <img src="/html/img/dian.png" class="dianImg">
                                <a href="{:url('portal/New/detail',array('id'=>$vo['id']))}">
                                    {$vo.post_title}
                                </a>
                            </li>
                        </portal:articles>
                    </ul>
                </div>
            </widget>
            </div>
            <div class="rank box activeTime newActive">
                <widget name="hottest_articles">
                <div class="login box">
                    <div class="title"><h2>活动新闻</h2> <a href="{:url('/news')}" class="more newMore">MORE</a></div>
                    <div class="box-cont hdtj">
                        <ul>
                            <portal:articles limit="5" order="post.post_hits DESC"
                                             categoryIds="1,2,3,4">
                                <php>$top=$key<3?"top3":"";</php>
                                <li>

                                    <img src="/html/img/dian.png" class="dianImg">
                                    <a href="{:url('portal/New/detail',array('id'=>$vo['id']))}">
                                        {$vo.post_title}
                                    </a>
                                </li>
                                </a>
                            </portal:articles>

                        </ul>
                    </div>
                </div>
                </widget>
            </div>
        </div>
        <div style="clear: both;"></div>
    </div>


    <include file="public@footer"/>
    <!-- /container -->
    <include file="public@scripts"/>
    <script>
        (function($){
            "use strict";
            function bind_events(){
                $('.title .title-item').off("click").on("click",function(e){
                    e.preventDefault();
                    var _index = $(this).index();
                    $(this).addClass('active').siblings().removeClass('active');
                    $('.activity .box-cont .act-forenotice').eq(_index).removeClass("hidden").siblings().addClass("hidden");
                });
                $('.tab-ctrl-item').off("click").on("click",function(e){
                    e.preventDefault();
                    var _index = $(this).index();
                    $(this).addClass('active').siblings().removeClass('active');
                    $('.rank .tab-pannel div').eq(_index).removeClass("hidden").siblings().addClass("hidden");
                });
            }
            $(function(){
                bind_events();
                $('.hdtj ul li:last').css("border","none");
                $('.zxgg ul li:last').css("border","none");
            })
        })(jQuery);

        //    layui
        layui.use(['laypage', 'layer'], function() {
            var laypage = layui.laypage
                    , layer = layui.layer;
//        分页
            laypage.render({
                elem: 'listOne'
                ,count: 100
                ,layout: ['prev', 'page', 'next', 'skip' ,'count']
                ,prev: '<em>←</em>'
                ,next: '<em>→</em>'
                ,jump: function(obj){
                    console.log(obj)
                }
            });
            laypage.render({
                elem: 'listTwo'
                ,count: 100
                ,layout: ['prev', 'page', 'next', 'skip' ,'count']
                ,prev: '<em>←</em>'
                ,next: '<em>→</em>'
                ,jump: function(obj){
                    console.log(obj)
                }
            });
        });
    </script>
    <hook name="before_body_end"/>
</body>
</html>